package com.ssy.lingxi.workflow.api.model.vo.response;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;

/**
 * 查询内部流程定义返回的VO
 * @author 万宁
 * @version 2.0.0
 * @date 2021-04-26
 */
public class InternalTaskVO implements Serializable {
    private static final long serialVersionUID = -5797575528278062338L;

    public InternalTaskVO() {
        this.taskStep = 0;
        this.taskName = "";
        this.userRoleName = "";
        this.properties = new HashMap<>();
    }

    /**
     * 流程步骤
     */
    private Integer taskStep;

    /**
     * 流程名称
     */
    private String taskName;

    /**
     * 可执行此步骤的用户角色名称
     */
    private String userRoleName;

    /**
     * 任务属性
     */
    private Map<String, String> properties;

    public Integer getTaskStep() {
        return taskStep;
    }

    public void setTaskStep(Integer taskStep) {
        this.taskStep = taskStep;
    }

    public String getTaskName() {
        return taskName;
    }

    public void setTaskName(String taskName) {
        this.taskName = taskName;
    }

    public String getUserRoleName() {
        return userRoleName;
    }

    public void setUserRoleName(String userRoleName) {
        this.userRoleName = userRoleName;
    }

    public Map<String, String> getProperties() {
        return properties;
    }

    public void setProperties(Map<String, String> properties) {
        this.properties = properties;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        InternalTaskVO that = (InternalTaskVO) o;
        return Objects.equals(taskStep, that.taskStep) &&
                Objects.equals(taskName, that.taskName) &&
                Objects.equals(userRoleName, that.userRoleName);
    }

    @Override
    public int hashCode() {
        return Objects.hash(taskStep, taskName, userRoleName);
    }
}
